home *** CD-ROM | disk | FTP | other *** search
-
- /* (C) Copyright Taiichi Yuasa and Masami Hagiya, 1984. All rights reserved. */
- #include <cmpinclude.h>
- #include "cmpspecial.h"
- init_cmpspecial(start,size,data)char *start;int size;object data;
- { register object *base=vs_top;register object *sup=base+VM2;vs_check;
- Cstart=start;Csize=size;Cdata=data;set_VV(VV,VM1,data);
- (void)(putprop(VV[0],VV[1],VV[2]));
- (void)(putprop(VV[3],VV[4],VV[2]));
- (void)(putprop(VV[3],VV[5],VV[6]));
- (void)(putprop(VV[7],VV[8],VV[2]));
- (void)(putprop(VV[9],VV[10],VV[2]));
- (void)(putprop(VV[11],VV[12],VV[2]));
- (void)(putprop(VV[13],VV[14],VV[2]));
- (void)(putprop(VV[13],VV[15],VV[6]));
- MF(VV[1],L9,start,size,data);
- MF(VV[10],L10,start,size,data);
- MF(VV[12],L11,start,size,data);
- MF(VV[8],L12,start,size,data);
- MF(VV[14],L13,start,size,data);
- MF(VV[15],L14,start,size,data);
- MF(VV[4],L15,start,size,data);
- MF(VV[5],L16,start,size,data);
- (void)(putprop(VV[38],VV[51],VV[52]));
- (void)(putprop(VV[50],VV[53],VV[52]));
- MF(VV[51],L19,start,size,data);
- MF(VV[53],L20,start,size,data);
- vs_top=vs_base=base;
- }
- /* function definition for C1QUOTE */
-
- static L9()
- { register object *base=vs_base;
- register object *sup=base+VM3;
- vs_reserve(VM3);
- check_arg(1);
- vs_top=sup;
- TTL:;
- if(!(endp(base[0]))){
- goto T11;}
- base[1]= VV[0];
- base[2]= VV[16];
- base[3]= VV[17];
- (void)simple_symlispcall_no_event(VV[56],base+1,3);
- T11:;
- if(endp(cdr(base[0]))){
- goto T17;}
- base[1]= VV[0];
- base[2]= VV[16];
- base[3]= make_fixnum(length(base[0]));
- (void)simple_symlispcall_no_event(VV[57],base+1,3);
- T17:;
- base[1]= car(base[0]);
- base[2]= Ct;
- symlispcall_no_event(VV[58],base+1,2);
- return;
- }
- /* function definition for C1EVAL-WHEN */
-
- static L10()
- { register object *base=vs_base;
- register object *sup=base+VM4;
- vs_reserve(VM4);
- check_arg(1);
- vs_top=sup;
- TTL:;
- if(!(endp(base[0]))){
- goto T25;}
- base[1]= VV[9];
- base[2]= VV[16];
- base[3]= VV[17];
- (void)simple_symlispcall_no_event(VV[56],base+1,3);
- T25:;
- {object V1;
- object V2;
- V1= car(base[0]);
- V2= car((V1));
- T34:;
- if(!(endp((V1)))){
- goto T35;}
- symlispcall_no_event(VV[59],base+1,0);
- return;
- T35:;
- {object V3= (V2);
- if((V3!= VV[60]))goto T40;
- base[1]= cdr(base[0]);
- symlispcall_no_event(VV[61],base+1,1);
- return;
- T40:;
- if((V3!= VV[62])
- && (V3!= VV[63]))goto T42;
- goto T39;
- T42:;
- base[1]= VV[18];
- base[2]= (V2);
- (void)simple_symlispcall_no_event(VV[64],base+1,2);}
- T39:;
- V1= cdr((V1));
- V2= car((V1));
- goto T34;}
- }
- /* function definition for C1DECLARE */
-
- static L11()
- { register object *base=vs_base;
- register object *sup=base+VM5;
- vs_reserve(VM5);
- check_arg(1);
- vs_top=sup;
- TTL:;
- base[1]= VV[19];
- base[2]= make_cons(VV[11],base[0]);
- symlispcall_no_event(VV[64],base+1,2);
- return;
- }
- /* function definition for C1THE */
-
- static L12()
- { register object *base=vs_base;
- register object *sup=base+VM6;
- vs_reserve(VM6);
- check_arg(1);
- vs_top=sup;
- TTL:;
- base[1]= Cnil;
- base[2]= Cnil;
- base[3]= Cnil;
- if(endp(base[0])){
- goto T53;}
- if(!(endp(cdr(base[0])))){
- goto T52;}
- T53:;
- base[4]= VV[7];
- base[5]= VV[20];
- base[6]= make_fixnum(length(base[0]));
- (void)simple_symlispcall_no_event(VV[56],base+4,3);
- T52:;
- if(endp(cddr(base[0]))){
- goto T60;}
- base[4]= VV[7];
- base[5]= VV[20];
- base[6]= make_fixnum(length(base[0]));
- (void)simple_symlispcall_no_event(VV[57],base+4,3);
- T60:;
- base[4]= cadr(base[0]);
- base[2]= simple_symlispcall_no_event(VV[65],base+4,1);
- base[4]= cadr(base[2]);
- base[1]= simple_symlispcall_no_event(VV[66],base+4,1);
- base[4]=symbol_function(VV[67]);
- base[6]= car(base[0]);
- base[5]= simple_symlispcall_no_event(VV[68],base+6,1);
- base[6]= structure_ref(base[1],VV[21],2);
- base[3]= simple_lispcall_no_event(base+4,2);
- if((base[3])!=Cnil){
- goto T77;}
- base[4]= VV[22];
- base[5]= make_cons(VV[7],base[0]);
- (void)simple_symlispcall_no_event(VV[69],base+4,2);
- T77:;
- structure_set(base[1],VV[21],2,base[3]);
- base[4]= listA(3,car(base[2]),base[1],cddr(base[2]));
- vs_top=(vs_base=base+4)+1;
- return;
- }
- /* function definition for C1COMPILER-LET */
-
- static L13()
- { register object *base=vs_base;
- register object *sup=base+VM7;
- vs_reserve(VM7);
- check_arg(1);
- vs_top=sup;
- TTL:;
- base[1]= Cnil;
- base[2]= Cnil;
- if(!(endp(base[0]))){
- goto T83;}
- base[3]= VV[13];
- base[4]= VV[16];
- base[5]= VV[17];
- (void)simple_symlispcall_no_event(VV[56],base+3,3);
- T83:;
- {object V4;
- object V5;
- V4= car(base[0]);
- V5= car((V4));
- T93:;
- if(!(endp((V4)))){
- goto T94;}
- goto T89;
- T94:;
- if(!(type_of((V5))==t_cons)){
- goto T100;}
- if(!(type_of(car((V5)))==t_symbol)){
- goto T103;}
- if(endp(cdr((V5)))){
- goto T102;}
- if(endp(cddr((V5)))){
- goto T102;}
- T103:;
- base[3]= VV[23];
- base[4]= (V5);
- (void)simple_symlispcall_no_event(VV[64],base+3,2);
- T102:;
- base[1]= make_cons(car((V5)),base[1]);
- if(!(endp(cdr((V5))))){
- goto T116;}
- base[3]= Cnil;
- goto T114;
- T116:;
- base[4]= cadr((V5));
- vs_top=(vs_base=base+4)+1;
- Leval();
- vs_top=sup;
- base[3]= vs_base[0];
- T114:;
- base[2]= make_cons(base[3],base[2]);
- goto T98;
- T100:;
- if(!(type_of((V5))==t_symbol)){
- goto T120;}
- base[1]= make_cons((V5),base[1]);
- base[2]= make_cons(Cnil,base[2]);
- goto T98;
- T120:;
- base[3]= VV[24];
- base[4]= (V5);
- (void)simple_symlispcall_no_event(VV[64],base+3,2);
- T98:;
- V4= cdr((V4));
- V5= car((V4));
- goto T93;}
- T89:;
- base[1]= reverse(base[1]);
- base[2]= reverse(base[2]);
- {object symbols,values;
- bds_ptr V6=bds_top;
- base[3]= base[1];
- symbols= base[3];
- base[4]= base[2];
- values= base[4];
- while(!endp(symbols)){
- if(type_of(MMcar(symbols))!=t_symbol)
- FEinvalid_variable("~s is not a symbol.",MMcar(symbols));
- if(endp(values))bds_bind(MMcar(symbols),OBJNULL);
- else{bds_bind(MMcar(symbols),MMcar(values));
- values=MMcdr(values);}
- symbols=MMcdr(symbols);}
- base[3]= cdr(base[0]);
- base[4]= simple_symlispcall_no_event(VV[61],base+3,1);
- bds_unwind(V6);
- base[0]= base[4];}
- base[3]= list(5,VV[13],cadr(base[0]),base[1],base[2],base[0]);
- vs_top=(vs_base=base+3)+1;
- return;
- }
- /* function definition for C2COMPILER-LET */
-
- static L14()
- { register object *base=vs_base;
- register object *sup=base+VM8;
- vs_reserve(VM8);
- check_arg(3);
- vs_top=sup;
- TTL:;
- {object symbols,values;
- bds_ptr V7=bds_top;
- base[3]= base[0];
- symbols= base[3];
- base[4]= base[1];
- values= base[4];
- while(!endp(symbols)){
- if(type_of(MMcar(symbols))!=t_symbol)
- FEinvalid_variable("~s is not a symbol.",MMcar(symbols));
- if(endp(values))bds_bind(MMcar(symbols),OBJNULL);
- else{bds_bind(MMcar(symbols),MMcar(values));
- values=MMcdr(values);}
- symbols=MMcdr(symbols);}
- base[3]= base[2];
- symlispcall_no_event(VV[70],base+3,1);
- bds_unwind(V7);
- return;}
- }
- /* function definition for C1FUNCTION */
-
- static L15()
- { register object *base=vs_base;
- register object *sup=base+VM9;
- vs_reserve(VM9);
- bds_check;
- check_arg(1);
- vs_top=sup;
- TTL:;
- base[1]= Cnil;
- if(!(endp(base[0]))){
- goto T144;}
- base[2]= VV[3];
- base[3]= VV[16];
- base[4]= VV[17];
- (void)simple_symlispcall_no_event(VV[56],base+2,3);
- T144:;
- if(endp(cdr(base[0]))){
- goto T150;}
- base[2]= VV[3];
- base[3]= VV[16];
- base[4]= make_fixnum(length(base[0]));
- (void)simple_symlispcall_no_event(VV[57],base+2,3);
- T150:;
- base[2]= car(base[0]);
- if(!(type_of(base[2])==t_symbol)){
- goto T158;}
- base[3]= base[2];
- base[1]= simple_symlispcall_no_event(VV[71],base+3,1);
- if((base[1])==Cnil){
- goto T161;}
- if(!(car(base[1])==VV[25])){
- goto T161;}
- base[3]= list(3,VV[3],symbol_value(VV[26]),base[1]);
- vs_top=(vs_base=base+3)+1;
- return;
- T161:;
- base[4]= VV[27];
- base[6]= get(base[2],VV[28],Cnil);
- base[5]= (base[6]==Cnil?Ct:Cnil);
- base[3]= simple_symlispcall_no_event(VV[72],base+4,2);
- base[4]= list(3,VV[29],base[3],base[2]);
- base[5]= list(3,VV[3],base[3],base[4]);
- vs_top=(vs_base=base+5)+1;
- return;
- T158:;
- if(!(type_of(base[2])==t_cons)){
- goto T172;}
- if(!(car(base[2])==VV[30])){
- goto T172;}
- if(!(endp(cdr(base[2])))){
- goto T176;}
- base[3]= VV[31];
- base[4]= base[2];
- (void)simple_symlispcall_no_event(VV[64],base+3,2);
- T176:;
- base[3]= make_cons(VV[33],symbol_value(VV[32]));
- base[4]= make_cons(VV[33],symbol_value(VV[34]));
- base[5]= make_cons(VV[33],symbol_value(VV[35]));
- base[6]= make_cons(VV[33],symbol_value(VV[36]));
- bds_bind(VV[32],base[3]);
- bds_bind(VV[34],base[4]);
- bds_bind(VV[35],base[5]);
- bds_bind(VV[36],base[6]);
- base[7]= cdr(base[2]);
- base[2]= simple_symlispcall_no_event(VV[73],base+7,1);
- base[7]= list(3,VV[3],cadr(base[2]),base[2]);
- vs_top=(vs_base=base+7)+1;
- bds_unwind1;
- bds_unwind1;
- bds_unwind1;
- bds_unwind1;
- return;
- T172:;
- base[3]= VV[37];
- base[4]= base[2];
- symlispcall_no_event(VV[64],base+3,2);
- return;
- }
- /* function definition for C2FUNCTION */
-
- static L16()
- { register object *base=vs_base;
- register object *sup=base+VM10;
- vs_reserve(VM10);
- check_arg(1);
- vs_top=sup;
- TTL:;
- {object V8= car(base[0]);
- if((V8!= VV[29]))goto T190;
- base[3]= caddr(base[0]);
- base[2]= simple_symlispcall_no_event(VV[74],base+3,1);
- base[1]= list(2,VV[38],base[2]);
- symlispcall_no_event(VV[75],base+1,1);
- return;
- T190:;
- if((V8!= VV[25]))goto T194;
- if((cadddr(base[0]))==Cnil){
- goto T196;}
- base[1]= list(2,VV[39],structure_ref(caddr(base[0]),VV[40],2));
- symlispcall_no_event(VV[75],base+1,1);
- return;
- T196:;
- base[1]= list(2,VV[41],structure_ref(caddr(base[0]),VV[40],1));
- symlispcall_no_event(VV[75],base+1,1);
- return;
- T194:;
- base[2]=symbol_function(VV[76]);
- base[3]= VV[42];
- base[4]= VV[43];
- base[5]= VV[44];
- setq(VV[45],number_plus(symbol_value(VV[45]),VV[16]));
- base[6]= symbol_value(VV[45]);
- base[1]= simple_lispcall_no_event(base+2,4);
- if((symbol_value(VV[47]))!=Cnil){
- goto T210;}
- base[2]= Cnil;
- goto T208;
- T210:;
- base[2]= make_cons(VV[17],VV[17]);
- T208:;
- base[3]= list(5,VV[43],base[2],symbol_value(VV[48]),base[1],base[0]);
- setq(VV[46],make_cons(base[3],symbol_value(VV[46])));
- setq(VV[49],make_cons(base[1],symbol_value(VV[49])));
- base[2]= list(3,VV[50],structure_ref(base[1],VV[40],3),symbol_value(VV[47]));
- symlispcall_no_event(VV[75],base+2,1);
- return;}
- }
- /* function definition for WT-SYMBOL-FUNCTION */
-
- static L19()
- { register object *base=vs_base;
- register object *sup=base+VM11;
- vs_reserve(VM11);
- check_arg(1);
- vs_top=sup;
- TTL:;
- if((symbol_value(VV[54]))==Cnil){
- goto T216;}
- princ_str("symbol_function(VV[",VV[55]);
- base[1]= base[0];
- (void)simple_symlispcall_no_event(VV[77],base+1,1);
- princ_str("])",VV[55]);
- base[1]= Cnil;
- vs_top=(vs_base=base+1)+1;
- return;
- T216:;
- princ_str("(VV[",VV[55]);
- base[1]= base[0];
- (void)simple_symlispcall_no_event(VV[77],base+1,1);
- princ_str("]->s.s_gfdef)",VV[55]);
- base[1]= Cnil;
- vs_top=(vs_base=base+1)+1;
- return;
- }
- /* function definition for WT-MAKE-CCLOSURE */
-
- static L20()
- { register object *base=vs_base;
- register object *sup=base+VM12;
- vs_reserve(VM12);
- check_arg(2);
- vs_top=sup;
- TTL:;
- princ_str("\n make_cclosure(LC",VV[55]);
- base[2]= base[0];
- (void)simple_symlispcall_no_event(VV[77],base+2,1);
- princ_str(",Cnil,",VV[55]);
- base[2]= base[1];
- (void)simple_symlispcall_no_event(VV[78],base+2,1);
- princ_str(",Cdata,Cstart,Csize)",VV[55]);
- base[2]= Cnil;
- vs_top=(vs_base=base+2)+1;
- return;
- }
-